package com.zyj.eps.service;

import com.zyj.eps.mapper.ManagerMapper;
import com.zyj.eps.pojo.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author super
 * @date 2022/4/3 17:40
 */
@Service
public class ManagerServiceImpl implements ManagerService {
    @Autowired
    private ManagerMapper managerMapper;

    @Override
    public Manager ManagerLogin(String mname, String password) {
        return managerMapper.ManagerLogin(mname, password);
    }

    @Override
    public Manager getManagerById(int mid) {
        return managerMapper.getManagerById(mid);
    }

    @Override
    public int updateManagerInfo(Manager manager) {
        return managerMapper.updateManagerInfo(manager);
    }

    @Override
    public int updateUserHealth(User user) {
        return managerMapper.updateUserHealth(user);
    }

    @Override
    public List<User> searchUserById(int id) {
        return managerMapper.searchUserById(id);
    }

    @Override
    public List<User> searchUserByName(String info) {
        return managerMapper.searchUserByName(info);
    }

    @Override
    public List<User> searchUserByHealth(String info) {
        return managerMapper.searchUserByHealth(info);
    }

    @Override
    public int updateGoodsNum(int goodsid, int num) {
        return managerMapper.updateGoodsNum(goodsid, num);
    }

    @Override
    public List<Record> getAllRecord() {
        return managerMapper.getAllRecord();
    }

    @Override
    public List<Record> searchRecordByUser(String uname) {
        return managerMapper.searchRecordByUser(uname);
    }

    @Override
    public List<Vaccine> ManagerAllVaccine() {
        return managerMapper.ManagerAllVaccine();
    }

    @Override
    public int deleteVaccine(int vid) {
        return managerMapper.deleteVaccine(vid);
    }

    @Override
    public int addVaccine(Vaccine vaccine) {
        return managerMapper.addVaccine(vaccine);
    }

    @Override
    public int insertNews(News news) {
        return managerMapper.insertNews(news);
    }

    @Override
    public int deleteNews(int newsid) {
        return managerMapper.deleteNews(newsid);
    }

    @Override
    public List<Manager> getAllManager() {
        return managerMapper.getAllManager();
    }

    @Override
    public int addManager(Manager manager) {
        return managerMapper.addManager(manager);
    }

    @Override
    public int deleteManagerById(int mid) {
        return managerMapper.deleteManagerById(mid);
    }

    @Override
    public int insertInform(Inform inform) {
        return managerMapper.insertInform(inform);
    }

    @Override
    public int deleteKnowledgeById(int id) {
        return managerMapper.deleteKnowledgeById(id);
    }

    @Override
    public int addKnowLedge(Knowledge knowledge) {
        return managerMapper.addKnowLedge(knowledge);
    }
}
